<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title></title>
    <script src="js/mui.min.js"></script>
    <link href="css/mui.min.css" rel="stylesheet"/>
    <link href="css/style.css" rel="stylesheet"/>
    <script type="text/javascript" src="./js/common.js"></script>
</head>
<body>
<div class="bg-white">
    <div class="bg-dark mui-text-center pdt-5 pdb-5 pos-relative logo-content">
        <div class="bg-dark flex flex-jc-around pdt-10 pd-10 pos-relative">
            <img src="./img/arbicap_logo.png" style="height: 80px" alt="">
            <h1 style="height: 80px;line-height: 80px;" class="cl-white">阿尔卑斯</h1>
        </div>
    </div>
	<div class="detail">
		<!-- 通知内容 -->
	</div>
</div>
<script>
	mui('.logo-content').on('click','div',function(){
		location.href = './index.html'
	})
	
	const search = location.search.split('=')
	const id = search[search.length-1]
	mui.ajax(HOST + 'v1/notice-detail', {
		data: {
			notice_id: id
		},
		type: 'get', //HTTP请求类型
		timeout: 10000, //超时时间设置为10秒；
		success: function(res) {
			//服务器返回响应，根据响应结果，分析是否登录成功；
			if (res.result === 0) {
				const detail = res.data
				let html = ''
				if(detail){
					html = `
					<h3 class="mui-text-center mgt-10">${detail.title}</h3>
					<div class="pd-10">
						${detail.content}
					</div>
					`
				}
				mui('.detail')[0].innerHTML = html
			} else {
				mui.toast(res.message, {
					duration: 'long',
					type: 'div'
				})
			}
		},
		error: function(xhr, type, errorThrown) {
			mui.toast(errorThrown, {
				duration: 'long',
				type: 'div'
			})
		}
	});
</script>
</body>
</html>
